package acm.pta9;

import java.util.Scanner;

public class T3 {
    static char[] ong = {'o', 'n', 'g'};

    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n = sc.nextInt();
        sc.nextLine();
        while (n-- > 0) {
            String line = sc.nextLine();
            if (isOk(line, ",") && isOk(line, ".")) {
                print(line);
            }else {
                System.out.println("Skipped");
            }
        }
    }

    public static boolean isOk(String str,String search) {
        int i = str.indexOf(search)-1;
        if (i == -1) {
            return false;
        }
        int j = ong.length - 1;
        for (; j >= 0 && i >= 0; j--, i--) {
            if (str.charAt(i)!=ong[j]) {
                return false;
            }
        }
        return j < 0;
    }
    public static void print(String str){
        String[] s = str.split(" ");
        for (int i = 0; i < s.length-3; i++) {
            System.out.print(s[i]+" ");
        }
        System.out.println("qiao ben zhong.");
    }
//    static {
//        String str="xun zhang zhai ju lao diao chong, xiao yue dang lian gua yu gong.";
//        System.out.println(isOk(str, ","));
//        System.out.println(isOk(str, "."));
//    }
}
